import { Module, CacheModule } from '@nestjs/common';
import { envString, envNumber } from '../../config/index'; // 导入一个配置项
import * as redisStore from 'cache-manager-redis-store';
@Module({
  imports: [
    CacheModule.register({
      store: redisStore,
      host: envString('REDIS_HOST', '192.168.59.111'),
      port: envNumber('REDIS_PORT', 6379),
    }),
  ],
  exports: [CacheModule],
})
export class RedisModule {}
